package com.dt.dubai.mall.entity;

import com.dt.dubai.core.comm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.*;

import javax.persistence.Table;
import javax.validation.constraints.*;


/*
 * 电商零售商品信息表
 */

@Data
@Table(name = "dt_mall_retail_commodity")
@EqualsAndHashCode(callSuper = false)
public class MallRetailCommodityEntity extends BaseEntity {

    //商户登录记录ID
    @NotNull(message = "adminLoginRecordId参数不能为空")
    Long adminLoginRecordId;

    //商品品牌记录ID
    @NotNull(message = "merchantBrandRecordId参数不能为空")
    Long merchantBrandRecordId;

    //商品类别记录ID
    @NotNull(message = "commodityTypeRecordId参数不能为空")
    Long commodityTypeRecordId;

    //商品属性类别记录ID
    @NotNull(message = "commodityAtbuRecordId参数不能为空")
    Long commodityAtbuRecordId;

    //商品编号
    @NotNull(message = "commodityCode参数不能为空")
    @Length(min = 0, max = 32, message = "commodityCode参数最大长度不32")
    String commodityCode;

    //类型 1-电商,2-检测,3-计量
    Short commodityType;

    //上架状态 1-下架,2-上架,3-禁售
    Short releaseState;

    //新品状态 0-否,1-是
    Boolean newState;

    //推荐状态 0-否,1-是
    Boolean recommendState;

    //审核状态 0-否,1-是
    Boolean verificationState;

    //序号
    Integer orderNum;

    //销量
    Integer saleNum;

    //售价
    Integer salePrice;

    //原价
    Integer originalPrice;

    //单位
    @Length(min = 0, max = 8, message = "unit参数最大长度不8")
    String unit;

    //重量
    Integer weight;

    //赠送积分
    Integer point;

    //商品标题
    @NotNull(message = "commodityTitle参数不能为空")
    @Length(min = 0, max = 100, message = "commodityTitle参数最大长度不100")
    String commodityTitle;

    //商品名称
    @NotNull(message = "commodityName参数不能为空")
    @Length(min = 0, max = 100, message = "commodityName参数最大长度不100")
    String commodityName;

    //子标题
    @Length(min = 0, max = 100, message = "subTitle参数最大长度不100")
    String subTitle;

    //商品描述
    String description;

    //商品图片
    @Length(min = 0, max = 300, message = "commodityImages参数最大长度不300")
    String commodityImages;

    //预告商品 0-否,1-是
    Boolean yesPreview;

    //商品服务 1-无忧退货,2-快速退款,3-免费包邮,4-无服务
    Short commodityService;

    //商品销售属性
    @Length(min = 0, max = 1000, message = "commodityInfoJson参数最大长度不1000")
    String commodityInfoJson;

    //报告属性
    @Length(min = 0, max = 500, message = "reportInfoJson参数最大长度不500")
    String reportInfoJson;

    //备注
    @Length(min = 0, max = 200, message = "remark参数最大长度不200")
    String remark;

    //产地
    @Length(min = 0, max = 200, message = "place参数最大长度不200")
    String place;

    //审核 1-未提,2-审中,3-通过,4-驳回 
    Integer examineState;


}
